package com.example.demo.service.impl;

import com.example.demo.dao.GoodsCategoryDao;
import com.example.demo.entity.GoodsCategory;
import com.example.demo.service.GoodsCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GoodsCategoryServiceImpl implements GoodsCategoryService {

    @Resource(type = GoodsCategoryDao.class)
    private GoodsCategoryDao goodsCategoryDao;

    @Override
    public GoodsCategoryDao getGoodsCategoryDao() {
        return goodsCategoryDao;
    }

    public GoodsCategory getById(Integer id) {
        return goodsCategoryDao.getById(id);
    }

    public GoodsCategory getByEntity(GoodsCategory goodsCategory) {
        return goodsCategoryDao.getByEntity(goodsCategory);
    }

    public List<GoodsCategory> listByEntity(GoodsCategory goodsCategory) {
        return goodsCategoryDao.listByEntity(goodsCategory);
    }

    public List<GoodsCategory> listByIds(List<Integer> ids) {
        return goodsCategoryDao.listByIds(ids);
    }

    public int insert(GoodsCategory goodsCategory) {
        return goodsCategoryDao.insert(goodsCategory);
    }

    public int insertBatch(List<GoodsCategory> list) {
        return goodsCategoryDao.insertBatch(list);
    }

    public int update(GoodsCategory goodsCategory) {
        return goodsCategoryDao.update(goodsCategory);
    }

    public int updateBatch(List<GoodsCategory> list) {
        return goodsCategoryDao.updateBatch(list);
    }

    public int deleteById(Integer id) {
        return goodsCategoryDao.deleteById(id);
    }

    public int deleteByEntity(GoodsCategory goodsCategory) {
        return goodsCategoryDao.deleteByEntity(goodsCategory);
    }

    public int deleteByIds(List<Integer> list) {
        return goodsCategoryDao.deleteByIds(list);
    }

    public int countAll() {
        return goodsCategoryDao.countAll();
    }

    public int countByEntity(GoodsCategory goodsCategory) {
        return goodsCategoryDao.countByEntity(goodsCategory);
    }

}
